import skeletonRoute from './skeleton-route'
import pageRoute from './page-route'

/**
 * 静态路由
 */
export default [
  skeletonRoute,
  ...pageRoute,
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login/Login'),
    props(route) {
      return {
        pwd: route.query.pwd,
        uname: route.query.uname
      }
    },
    meta: {
      requireLogin: false
    }
  },
  {
    path: '/ssoLogin',
    name: 'SsoLogin',
    component: () => import('@/views/login/SsoLogin.vue'),
    props(route) {
      return {
        code: route.query.code,
        type: route.query.type,
        title: route.query.title
      }
    },
    meta: {
      requireLogin: false
    }
  },
  {
    path: '/lockApp',
    name: 'LockApp',
    component: () => import('@/views/skeleton/widgets/LockApp')
  },
  {
    path: '*',
    redirect: '/404'
  }
]
